//引入Vue
import Vue from 'vue'
//引入app
import App from './App.vue'
//引入一个ui组件库
import ElementUI from 'element-ui';
//引入Element全部样式
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI)

//引入vueResource插件 vuex
import VueResource from 'vue-resource'
import store from './store'
Vue.use(VueResource)

//引入VueRouter 路由
import VueRouter from 'vue-router'
//引入一个路由器
import router from './router'
Vue.use(VueRouter)

//关闭vue生产提示
Vue.config.productionTip = false
//全局引入api
import * as API from "@/api";

//创建vm
new Vue({
  el:"#app",
  render: h => h(App),
  store,
  router,
  beforeCreate() {
    Vue.prototype.$bus = this //安装全局事件总线
    Vue.prototype.$API = API
  },
}) 